package com.ws.entity;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author 王硕
 * @version jdk21
 * @className Computer
 * @description
 * @date 2024/11/7 16:39
 */
@Data
@Accessors(chain = true)
public class Computer {
    private String name;
    private int computeroutput;

    public void show() {
        this.computeroutput = ((int) (Math.random() * 3)) + 1;
        switch (this.computeroutput) {
            case 1:
                System.out.println(this.name + "出的是剪刀");
                break;
            case 2:
                System.out.println(this.name + "出的是石头");
                break;
            case 3:
                System.out.println(this.name + "出的是布");
                break;
        }
    }

}
